Skip to content

Comments

test(linter/plugins): fix tests on Windows#15966

Merged
graphite-app[bot] merged 1 commit intomainfrom
11-22-test_linter_plugins_fix_tests_on_windows
Nov 22, 2025
Merged

test(linter/plugins): fix tests on Windows#15966
graphite-app[bot] merged 1 commit intomainfrom
11-22-test_linter_plugins_fix_tests_on_windows

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Nov 22, 2025

#15911 broke NAPI tests on Windows, because it failed to replace \ with / in file paths in snapshots.

https://github.com/oxc-project/oxc/actions/runs/19581028169/job/56078684915#step:8:479

Fix this by normalizing slashes in file paths before outputting them in snapshots.

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI labels Nov 22, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions bot added the C-test Category - Testing. Code is missing test cases, or a PR is adding them label Nov 22, 2025
@overlookmotel overlookmotel marked this pull request as ready for review November 22, 2025 14:59
Copilot AI review requested due to automatic review settings November 22, 2025 14:59
@overlookmotel overlookmotel self-assigned this Nov 22, 2025
@overlookmotel overlookmotel added the A-linter-plugins Area - Linter JS plugins label Nov 22, 2025
@overlookmotel
Copy link
Member Author

overlookmotel commented Nov 22, 2025

CI is currently broken, and hopefully this'll fix it, so merging without review.

@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Nov 22, 2025
Copy link
Member Author

overlookmotel commented Nov 22, 2025

Merge activity

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes Windows test failures in the NAPI tests by normalizing file path slashes in test snapshots. The issue occurred because Windows uses backslashes (\) in file paths while the snapshots expected forward slashes (/), causing snapshot mismatches on Windows.

Key Changes

  • Applied normalizeSlashes() to file paths before they are used in test snapshots
  • Extracted pathPrefixLen constant for improved code clarity

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

#15911 broke NAPI tests on Windows, because it failed to replace `\` with `/` in file paths in snapshots.

https://github.com/oxc-project/oxc/actions/runs/19581028169/job/56078684915#step:8:479

Fix this by normalizing slashes in file paths before outputting them in snapshots.
@graphite-app graphite-app bot force-pushed the 11-22-test_linter_plugins_fix_tests_on_windows branch from 4d87b00 to 06f4454 Compare November 22, 2025 15:05
@graphite-app graphite-app bot merged commit 06f4454 into main Nov 22, 2025
18 checks passed
@graphite-app graphite-app bot deleted the 11-22-test_linter_plugins_fix_tests_on_windows branch November 22, 2025 15:11
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 22, 2025
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
oxc-project#15911 broke NAPI tests on Windows, because it failed to replace `\` with `/` in file paths in snapshots.

https://github.com/oxc-project/oxc/actions/runs/19581028169/job/56078684915#step:8:479

Fix this by normalizing slashes in file paths before outputting them in snapshots.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-linter Area - Linter A-linter-plugins Area - Linter JS plugins C-test Category - Testing. Code is missing test cases, or a PR is adding them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant